function video_ok() {
	$(".article_content embed, .article_content video, .article_content iframe").each(function() {
		var t = $(this).attr("width"),
			i = $(this).attr("height");
		i && $(this).css("height", $(this).width() / (t / i))
	})
}

function img_ok() {
	$(".article_content img").each(function() {
		var t = $(this).attr("width"),
			i = $(this).attr("height");
		i && $(this).css("height", $(this).width() / (t / i))
	})
}
$(function() {
		$(".mnav").click(function() {
			$(".mnav i").toggleClass("fa-remove"), $(".mnav i").toggleClass("fa-bars"), $(".nav").slideToggle(0)
		}), $(".m_search").click(function() {
			$(".m_search_box").slideToggle(50)
		}), $(".m_search_box span").click(function() {
			$(".m_search_box").slideUp(50)
		})
	}), $(function() {
		var t, i, e, n, o, a, s;
		t = window, e = $("#callboard"), n = e.find("ul"), o = e.find("li"), a = e.find("li").length, s = o.first().outerHeight(
			!0), t.autoAnimation = function() {
			if (!(a <= 1)) {
				var t = arguments.callee,
					o = e.find("li").first();
				o.animate({
					marginTop: -s
				}, 500, function() {
					clearTimeout(i), o.appendTo(n).css({
						marginTop: 0
					}), i = setTimeout(t, 2e3)
				})
			}
		}, e.mouseenter(function() {
			clearTimeout(i)
		}).mouseleave(function() {
			i = setTimeout(t.autoAnimation, 5e3)
		}), setTimeout(window.autoAnimation, 5e3)
	}), $(function() {
		! function() {
			var t = $("div.m-slide");
			if ("undefined" != t) {
				var i = t.children(".img"),
					e = t.find("#ifocus_tx").children("ul"),
					n = t.children(".tab"),
					o = i.find("li"),
					a = e.find("li"),
					s = n.find("li");
				s.width(130);
				var r = 0,
					d = !0;
				c(0), o.each(function(t) {
					var i;
					i = t, s.eq(i).mouseenter(function() {
						r != i && c(i)
					})
				}), setInterval(function() {
					var t = (r + 1) % 4;
					d && s.eq(t).trigger("mouseenter")
				}, 2e3)
			}

			function c(t) {
				d && (d = !1, s.eq(r).attr("class", ""), s.eq(t).attr("class", "on"), o.eq(r).fadeOut("fast"), o.eq(t).fadeIn(
					"fast",
					function() {
						d = !0
					}), a.eq(r).hide(), a.eq(t).show(), r = t)
			}
		}()
	}), $(function() {
		! function() {
			var t = $("div.side_Menu");
			if ("undefined" != t) {
				var i = t.find("h3"),
					e = t.find("p"),
					n = 0,
					o = !0;
				e.hide(), a(4), i.each(function(t) {
					var e;
					e = t, i.eq(e).mouseenter(function() {
						n != e && a(e)
					})
				})
			}

			function a(t) {
				o && (o = !1, e.eq(t).slideDown("normal"), e.eq(n).slideUp("normal", function() {
					o = !0
				}), n = t)
			}
		}()
	}), $(window).scroll(function() {
		var t = $(window).scrollTop();
		$(window).width(), $(document).scrollLeft(), $(window).height(), $(document).scrollTop();
		t > 0 ? $("#goTop").show() : $("#goTop").hide()
	}), $("#goTop").click(function() {
		$("body,html").animate({
			scrollTop: 0
		}, 300)
	}), $(function() {
		var t = $("#monavber").attr("data-type");
		$(".navbar>li ").each(function() {
			try {
				var i = $(this).attr("id");
				if ("index" == t) "nvabar-item-index" == i && $("#nvabar-item-index").addClass("active");
				else if ("category" == t) {
					if (null != (o = $("#monavber").attr("data-infoid")))
						for (var e = o.split(" "), n = 0; n < e.length; n++) i == "navbar-category-" + e[n] && $("#navbar-category-" +
							e[n]).addClass("active")
				} else if ("article" == t) {
					if (null != (o = $("#monavber").attr("data-infoid")))
						for (e = o.split(" "), n = 0; n < e.length; n++) i == "navbar-category-" + e[n] && $("#navbar-category-" + e[n])
							.addClass("active")
				} else if ("page" == t) {
					null != (o = $("#monavber").attr("data-infoid")) && i == "navbar-page-" + o && $("#navbar-page-" + o).addClass(
						"active")
				} else if ("tag" == t) {
					var o;
					null != (o = $("#monavber").attr("data-infoid")) && i == "navbar-tag-" + o && $("#navbar-tag-" + o).addClass(
						"active")
				}
			} catch (t) {}
		}), $("#monavber").delegate("a", "click", function() {
			$(".navbar>li").each(function() {
				$(this).removeClass("active")
			}), null != $(this).closest("ul") && 0 != $(this).closest("ul").length && ("munavber" == $(this).closest("ul").attr(
				"id") ? $(this).addClass("active") : $(this).closest("ul").closest("li").addClass("active"))
		});
		$('ul[class=tit]').find('li').find('a').on('click', function() {
			$('ul[class=tit]').find('li').removeClass('active');
			$(this).parent('li').addClass('active');
			cls_tag = $(this).attr('data');
			$('.paihang').find('.ph_list').hide();
			$('.paihang').find('#' + cls_tag).show()
		})
	}), $(function() {
		$(".article_content").find("img").css({
			width: "",
			"max-width": "",
			"min-width": "",
			height: "",
			"max-height": "",
			"min-height": ""
		})
	}), $(function() {
		$(document);
		$(".widget_tags li").each(function() {
			var t = parseInt(10 * Math.random() + 0);
			$(this).addClass("tagbgc" + t)
		})
	}),
	function($, window, undefined) {
		$.fn.tabslet = function(options) {
			var defaults = {
					mouseevent: "click",
					attribute: "href",
					animation: !1,
					autorotate: !1,
					pauseonhover: !0,
					delay: 2e3,
					active: 1,
					controls: {
						prev: ".prev",
						next: ".next"
					}
				},
				options = $.extend(defaults, options);
			return this.each(function() {
				var $this = $(this);
				options.mouseevent = $this.data("mouseevent") || options.mouseevent, options.attribute = $this.data("attribute") ||
					options.attribute, options.animation = $this.data("animation") || options.animation, options.autorotate = $this
					.data("autorotate") || options.autorotate, options.pauseonhover = $this.data("pauseonhover") || options.pauseonhover,
					options.delay = $this.data("delay") || options.delay, options.active = $this.data("active") || options.active,
					$this.find("> div").hide(), $this.find("> div").eq(options.active - 1).show(), $this.find("> ul li").eq(options
						.active - 1).addClass("active");
				var fn = eval(function() {
						$(this).trigger("_before"), $this.find("> ul li").removeClass("active"), $(this).addClass("active"), $this.find(
							"> div").hide();
						var t = $(this).find("a").attr(options.attribute);
						return options.animation ? $this.find(t).animate({
							opacity: "show"
						}, "slow", function() {
							$(this).trigger("_after")
						}) : ($this.find(t).show(), $(this).trigger("_after")), !1
					}),
					init = eval("$this.find('> ul li')." + options.mouseevent + "(fn)"),
					elements = $this.find("> ul li"),
					i = options.active - 1;

				function forward() {
					i = ++i % elements.length, "hover" == options.mouseevent ? elements.eq(i).trigger("mouseover") : elements.eq(i)
						.click();
					var t = setTimeout(forward, options.delay);
					$this.mouseover(function() {
						options.pauseonhover && clearTimeout(t)
					})
				}

				function move(t) {
					"forward" == t && (i = ++i % elements.length), "backward" == t && (i = --i % elements.length), elements.eq(i).click()
				}
				options.autorotate && (setTimeout(forward, 0), options.pauseonhover && $this.on("mouseleave", function() {
					setTimeout(forward, 1e3)
				})), $this.find(options.controls.next).click(function() {
					move("forward")
				}), $this.find(options.controls.prev).click(function() {
					move("backward")
				}), $this.on("destroy", function() {
					$(this).removeData()
				})
			})
		}, $(document).ready(function() {
			$('[data-toggle="tabslet"]').tabslet()
		})
	}(jQuery),
	function() {
		var t = function(i, e) {
			function n(t, i) {
				if (t.resizedAttached) {
					if (t.resizedAttached) return void t.resizedAttached.add(i)
				} else t.resizedAttached = new function() {
					var t, i;
					this.q = [], this.add = function(t) {
						this.q.push(t)
					}, this.call = function() {
						for (t = 0, i = this.q.length; t < i; t++) this.q[t].call()
					}
				}, t.resizedAttached.add(i);
				t.resizeSensor = document.createElement("div"), t.resizeSensor.className = "resize-sensor";
				var e, n, o =
					"position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;",
					a = "position: absolute; left: 0; top: 0; transition: 0s;";
				t.resizeSensor.style.cssText = o, t.resizeSensor.innerHTML = '<div class="resize-sensor-expand" style="' + o +
					'"><div style="' + a + '"></div></div><div class="resize-sensor-shrink" style="' + o + '"><div style="' + a +
					' width: 200%; height: 200%"></div></div>', t.appendChild(t.resizeSensor), {
						fixed: 1,
						absolute: 1
					} [(e = t, n = "position", e.currentStyle ? e.currentStyle[n] : window.getComputedStyle ? window.getComputedStyle(
						e, null).getPropertyValue(n) : e.style[n])] || (t.style.position = "relative");
				var s, r, d = t.resizeSensor.childNodes[0],
					c = d.childNodes[0],
					l = t.resizeSensor.childNodes[1],
					h = (l.childNodes[0], function() {
						c.style.width = d.offsetWidth + 10 + "px", c.style.height = d.offsetHeight + 10 + "px", d.scrollLeft = d.scrollWidth,
							d.scrollTop = d.scrollHeight, l.scrollLeft = l.scrollWidth, l.scrollTop = l.scrollHeight, s = t.offsetWidth, r =
							t.offsetHeight
					});
				h();
				var f = function(t, i, e) {
						t.attachEvent ? t.attachEvent("on" + i, e) : t.addEventListener(i, e)
					},
					u = function() {
						t.offsetWidth == s && t.offsetHeight == r || t.resizedAttached && t.resizedAttached.call(), h()
					};
				f(d, "scroll", u), f(l, "scroll", u)
			}
			var o = Object.prototype.toString.call(i),
				a = "[object Array]" === o || "[object NodeList]" === o || "[object HTMLCollection]" === o || "undefined" !=
				typeof jQuery && i instanceof jQuery || "undefined" != typeof Elements && i instanceof Elements;
			if (a)
				for (var s = 0, r = i.length; s < r; s++) n(i[s], e);
			else n(i, e);
			this.detach = function() {
				if (a)
					for (var e = 0, n = i.length; e < n; e++) t.detach(i[e]);
				else t.detach(i)
			}
		};
		t.detach = function(t) {
			t.resizeSensor && (t.removeChild(t.resizeSensor), delete t.resizeSensor, delete t.resizedAttached)
		}, "undefined" != typeof module && void 0 !== module.exports ? module.exports = t : window.ResizeSensor = t
	}(),
	function(t) {
		t.fn.theiaStickySidebar = function(i) {
			function e(i, e) {
				return !0 === i.initialized || !(t("body").width() < i.minWidth) && (a = e, (o = i).initialized = !0, 0 === t(
					"#theia-sticky-sidebar-stylesheet-" + o.namespace).length && t("head").append(t(
					'<style id="theia-sticky-sidebar-stylesheet-' + o.namespace +
					'">.theiaStickySidebar:after {content: ""; display: table; clear: both;}</style>')), a.each(function() {
					function i() {
						e.fixedScrollTop = 0, e.sidebar.css({
							"min-height": "1px"
						}), e.stickySidebar.css({
							position: "static",
							width: "",
							transform: "none"
						})
					}
					var e = {};
					if (e.sidebar = t(this), e.options = o || {}, e.container = t(e.options.containerSelector), 0 == e.container.length &&
						(e.container = e.sidebar.parent()), e.sidebar.parents().css("-webkit-transform", "none"), e.sidebar.css({
							position: e.options.defaultPosition,
							overflow: "visible",
							"-webkit-box-sizing": "border-box",
							"-moz-box-sizing": "border-box",
							"box-sizing": "border-box"
						}), e.stickySidebar = e.sidebar.find(".theiaStickySidebar"), 0 == e.stickySidebar.length) {
						var a = /(?:text|application)\/(?:x-)?(?:javascript|ecmascript)/i;
						e.sidebar.find("script").filter(function(t, i) {
								return 0 === i.type.length || i.type.match(a)
							}).remove(), e.stickySidebar = t("<div>").addClass("theiaStickySidebar").append(e.sidebar.children()), e.sidebar
							.append(e.stickySidebar)
					}
					e.marginBottom = parseInt(e.sidebar.css("margin-bottom")), e.paddingTop = parseInt(e.sidebar.css("padding-top")),
						e.paddingBottom = parseInt(e.sidebar.css("padding-bottom"));
					var s, r, d, c = e.stickySidebar.offset().top,
						l = e.stickySidebar.outerHeight();
					e.stickySidebar.css("padding-top", 1), e.stickySidebar.css("padding-bottom", 1), c -= e.stickySidebar.offset()
						.top, l = e.stickySidebar.outerHeight() - l - c, 0 == c ? (e.stickySidebar.css("padding-top", 0), e.stickySidebarPaddingTop =
							0) : e.stickySidebarPaddingTop = 1, 0 == l ? (e.stickySidebar.css("padding-bottom", 0), e.stickySidebarPaddingBottom =
							0) : e.stickySidebarPaddingBottom = 1, e.previousScrollTop = null, e.fixedScrollTop = 0, i(), e.onScroll =
						function(e) {
							if (e.stickySidebar.is(":visible")) {
								if (t("body").width() < e.options.minWidth) return void i();
								if (e.options.disableOnResponsiveLayouts) {
									var a = e.sidebar.outerWidth("none" == e.sidebar.css("float"));
									if (a + 50 > e.container.width()) return void i()
								}
								var s = t(document).scrollTop(),
									r = "static";
								if (s >= e.sidebar.offset().top + (e.paddingTop - e.options.additionalMarginTop)) {
									var d, c = e.paddingTop + o.additionalMarginTop,
										l = e.paddingBottom + e.marginBottom + o.additionalMarginBottom,
										h = e.sidebar.offset().top,
										f = e.sidebar.offset().top + ($ = e.container, k = $.height(), $.children().each(function() {
											k = Math.max(k, t(this).height())
										}), k),
										u = 0 + o.additionalMarginTop,
										g = e.stickySidebar.outerHeight() + c + l < t(window).height();
									d = g ? u + e.stickySidebar.outerHeight() : t(window).height() - e.marginBottom - e.paddingBottom - o.additionalMarginBottom;
									var p = h - s + e.paddingTop,
										m = f - s - e.paddingBottom - e.marginBottom,
										v = e.stickySidebar.offset().top - s,
										b = e.previousScrollTop - s;
									"fixed" == e.stickySidebar.css("position") && "modern" == e.options.sidebarBehavior && (v += b),
										"stick-to-top" == e.options.sidebarBehavior && (v = o.additionalMarginTop), "stick-to-bottom" == e.options
										.sidebarBehavior && (v = d - e.stickySidebar.outerHeight()), v = b > 0 ? Math.min(v, u) : Math.max(v, d -
											e.stickySidebar.outerHeight()), v = Math.max(v, p), v = Math.min(v, m - e.stickySidebar.outerHeight());
									var y = e.container.height() == e.stickySidebar.outerHeight();
									r = !y && v == u || !y && v == d - e.stickySidebar.outerHeight() ? "fixed" : s + v - e.sidebar.offset().top -
										e.paddingTop <= o.additionalMarginTop ? "static" : "absolute"
								}
								if ("fixed" == r) {
									var S = t(document).scrollLeft();
									e.stickySidebar.css({
										position: "fixed",
										width: n(e.stickySidebar) + "px",
										transform: "translateY(" + v + "px)",
										left: e.sidebar.offset().left + parseInt(e.sidebar.css("padding-left")) - S + "px",
										top: "0px"
									})
								} else if ("absolute" == r) {
									var w = {};
									"absolute" != e.stickySidebar.css("position") && (w.position = "absolute", w.transform = "translateY(" + (
											s + v - e.sidebar.offset().top - e.stickySidebarPaddingTop - e.stickySidebarPaddingBottom) + "px)", w.top =
										"0px"), w.width = n(e.stickySidebar) + "px", w.left = "", e.stickySidebar.css(w)
								} else "static" == r && i();
								"static" != r && 1 == e.options.updateSidebarHeight && e.sidebar.css({
									"min-height": e.stickySidebar.outerHeight() + e.stickySidebar.offset().top - e.sidebar.offset().top + e.paddingBottom
								}), e.previousScrollTop = s
							}
							var $, k
						}, e.onScroll(e), t(document).on("scroll." + e.options.namespace, (d = e, function() {
							d.onScroll(d)
						})), t(window).on("resize." + e.options.namespace, (r = e, function() {
							r.stickySidebar.css({
								position: "static"
							}), r.onScroll(r)
						})), "undefined" != typeof ResizeSensor && new ResizeSensor(e.stickySidebar[0], (s = e, function() {
							s.onScroll(s)
						}))
				}), !0);
				var o, a
			}

			function n(t) {
				var i;
				try {
					i = t[0].getBoundingClientRect().width
				} catch (t) {}
				return void 0 === i && (i = t.width()), i
			}
			var o, a, s, r, d, c;
			return (i = t.extend({
					containerSelector: "",
					additionalMarginTop: 0,
					additionalMarginBottom: 0,
					updateSidebarHeight: !0,
					minWidth: 0,
					disableOnResponsiveLayouts: !0,
					sidebarBehavior: "modern",
					defaultPosition: "relative",
					namespace: "TSS"
				}, i)).additionalMarginTop = parseInt(i.additionalMarginTop) || 0, i.additionalMarginBottom = parseInt(i.additionalMarginBottom) ||
				0, e(o = i, a = this) || (console.log("TSS: Body width smaller than options.minWidth. Init is delayed."), t(
					document).on("scroll." + o.namespace, (d = o, c = a, function(i) {
					e(d, c) && t(this).unbind(i)
				})), t(window).on("resize." + o.namespace, (s = o, r = a, function(i) {
					e(s, r) && t(this).unbind(i)
				}))), this
		}
	}(jQuery), jQuery(document).ready(function(t) {
		jQuery("#main_right").theiaStickySidebar({
			additionalMarginTop: 70
		})

	});
